Release 10.1A: OpenEdge Development:
Programming Interfaces
Validating component handles
If you reference a
COM-HANDLEvariable whose value does not point to a valid COM object, Progress returns an error indicating that an action was performed on an invalidCOM-HANDLE. To protect against this error, use the ProgressVALID-HANDLEfunction to determine if theCOM-HANDLEvariable contains a valid value before using it in any other Progress statement. As with widget handles, theVALID-HANDLEfunction returnsTRUEif the component handle is valid.Note that you cannot use the
VALID-HANDLEfunction to verify that a component handle value points to a particular COM object.COM-HANDLEvalues might be reused within an application when the COM objects they point to are no longer available. For more information, see the "Managing COM object resources" section.Also, this function only indicates that a component handle is invalid from some action (or inaction) of the OpenEdge application. It does not show as invalid a COM handle that a user might have manually closed, for example, an Automation Server application that provided the COM object.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |